package com.example.yjhero.safeapp.utils;

import android.content.Context;
import android.widget.Toast;

/**
 * Created by wt on 17-8-17.
 */

public class DialogUtil {
    public static void showInToast(Context context, String text) {
        Toast.makeText(context, text, Toast.LENGTH_SHORT).show();
    }

    public static void showInToast(String text) {
        Toast.makeText(AppUtil.getContext(), text, Toast.LENGTH_SHORT).show();
    }

    public static void showToastOnUI(final String text) {
        ThreadUtil.runOnUI(new Runnable() {
            @Override
            public void run() {
                showInToast(text);
            }
        });
    }

}
